package org.yijiaganxi.common.entity.product;

import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableName;
import org.yijiaganxi.common.entity.takeAddress.YjgxTakeAddress;
import org.yijiaganxi.common.entity.takeAddress.YjgxTakeAddress.YjgxTakeAddressBuilder;

import com.baomidou.mybatisplus.annotations.TableField;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 商品管理
 * </p>
 *
 * @author zhangguowei123
 * @since 2020-08-29
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yjgx_product")
public class YjgxProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    @TableField("createDate")
    private Date createDate;
    @TableField("modifyDate")
    private Date modifyDate;
    @TableField("createUser")
    private String createUser;
    @TableField("modifyUser")
    private String modifyUser;
    
    @NotBlank(message = "商品名必填")
    private String name;
    
    @NotBlank(message = "商品分类必填")
    @TableField("categoryId")
    private Long categoryId;
    
    @NotBlank(message = "商品图片必填")
    @TableField("productImg")
    private String productImg;
    
    @NotBlank(message = "商品价格必填")
    private BigDecimal price;
    @TableField("memberPrice")
    
    
    private BigDecimal memberPrice;
    private BigDecimal weight;
    @TableField("productLabel")
    private String productLabel;
    /**
     * 0不启用  1启用
     */
    @NotBlank(message = "商品状态必填")
    private Integer status;
    private String detail;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getMemberPrice() {
        return memberPrice;
    }

    public void setMemberPrice(BigDecimal memberPrice) {
        this.memberPrice = memberPrice;
    }

    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public String getProductLabel() {
        return productLabel;
    }

    public void setProductLabel(String productLabel) {
        this.productLabel = productLabel;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Override
    public String toString() {
        return "YjgxProduct{" +
        "id=" + id +
        ", createDate=" + createDate +
        ", modifyDate=" + modifyDate +
        ", createUser=" + createUser +
        ", modifyUser=" + modifyUser +
        ", name=" + name +
        ", categoryId=" + categoryId +
        ", productImg=" + productImg +
        ", price=" + price +
        ", memberPrice=" + memberPrice +
        ", weight=" + weight +
        ", productLabel=" + productLabel +
        ", status=" + status +
        ", detail=" + detail +
        "}";
    }
}
